/**
 * 初始化折线图
 * @param div_id
 */
function createChart_a(div_id){
      if(div_id=='chart_1'){
          $('#chart_1').highcharts({
              chart: {
                  zoomType: 'xy'
              },
              title: {
                  text: ''
              },
              subtitle: {
                  text: ''
              },
              xAxis: [{
                  categories: ['1月', '2月', '3月', '4月', '5月', '6月',
                      '7月', '8月', '9月', '10月', '11月', '12月'],
                  crosshair: true
              }],
              yAxis: [{ // Secondary yAxis
                  title: {
                      text: '',
                      style: {
                          color: Highcharts.getOptions().colors[0]
                      }
                  },
                  labels: {
                      format: '{value}% ',
                      style: {
                          color: Highcharts.getOptions().colors[0]
                      }
                  },
                  opposite: true
              },{ // Primary yAxis
                  labels: {
                      format: '{value}',
                      style: {
                          color: Highcharts.getOptions().colors[1]
                      }
                  },
                  title: {
                      text: '单位：条',
                      style: {
                          color: Highcharts.getOptions().colors[1]
                      }
                  }
              }],
              tooltip: {
                  shared: true
              },
              legend: {
                  layout: 'vertical',
                  align: 'left',
                  x: 50,
                  verticalAlign: 'top',
                  y: 50,
                  floating: true,
                  backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
              },
              series: [{
                  name: '2015',
                  type: 'column',
                  yAxis: 1,
                  data: [600, 800, 700, 680, 520, 400, 400, 480, 450, 500, 900, 400],
                  tooltip: {
                      valueSuffix: ' mm'
                  }

              }, {
                  name: '增长率',
                  type: 'spline',
                  data: [-40, -50, 100, -25, -20, 20, 0, 25, 25, 10, -10,10],
                  tooltip: {
                      valueSuffix: '°C'
                  }
              }]
          });
      }
    else if(div_id=='chart_2'){
          $('#chart_2').highcharts({
              title: {
                  text: '',
                  x: -20 //center
              },
              subtitle: {
                  text: '',
                  x: -20
              },
              xAxis: {
                  categories: ['1月', '2月', '3月', '4月', '5月', '6月',
                      '7月', '8月', '9月', '10月', '11月', '12月']
              },
              yAxis: {
                  title: {
                      text: ''
                  },
                  plotLines: [{
                      value: 0,
                      width: 1,
                      color: '#808080'
                  }]
              },
              tooltip: {
                  valueSuffix: '°C'
              },
              legend: {
                  layout: 'horizontal',
                  align: 'right',
                  verticalAlign: 'top',
                  borderWidth: 0
              },
              series: [{
                  name: '中国移动',
                  data: [40,30, 70, 80, 70, 60, 70, 60, 50, 70, 50, 30]
              }, {
                  name: '中国联通',
                  data: [70,40, 90, 90, 90, 80, 80, 90, 70, 90, 120, 150]
              }, {
                  name: '中国电信',
                  data: [80, 50, 150, 160, 140, 150, 240, 230, 220, 240, 210, 170]
              }]
          });
    }else if(div_id=='chart_5'){
          $('#chart_5').highcharts({
              chart: {
                  type: 'column'
              },
              title: {
                  text: ''
              },
              subtitle: {
                  text: ''
              },
              xAxis: {
                  categories: [
                      '僵尸网络控制端',
                      '僵尸网络受控端',
                      '蠕虫感染',
                      '恶意域名',
                      '遭篡改网站'
                  ],
                  crosshair: true
              },
              yAxis: {
                  min: 0,
                  title: {
                      text: '%'
                  }
              },
              tooltip: {
                  headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                  pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                      '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
                  footerFormat: '</table>',
                  shared: true,
                  useHTML: true
              },
              plotOptions: {
                  column: {
                      pointPadding: 0.2,
                      borderWidth: 0
                  }
              },
              series: [{
                  name: '中国移动占行业比率',
                  data: [10, 8, 3, 5, 4]

              }]
          });

      }
      else{
          $('#'+div_id).highcharts({
              title: {
                  text: '',
                  x: -20 //center
              },
              subtitle: {
                  text: '',
                  x: -20
              },
              xAxis: {
                  categories: ['一月', '二月', '三月', '四月', '五月', '六月',
                      '七月', '八月', '九月', '十月', '十一月', '十二月']
              },
              yAxis: {
                  title: {
                      text: ''
                  },
                  plotLines: [{
                      value: 0,
                      width: 1,
                      color: '#808080'
                  }]
              },
              tooltip: {
                  valueSuffix: '°C'
              },
              legend: {
                  layout: 'vertical',
                  align: 'right',
                  verticalAlign: 'middle',
                  borderWidth: 0
              },
              series: [{
                  name: '业务支撑部',
                  data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
              }, {
                  name: '网络部',
                  data: [3, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
              }]
          });
      }
}
